package com.beta.elephant.constant;

public interface JobEnum {
    /**
     * 任务类型
     */
    public static enum JobType {
        ReturnStock(1, "回退库存Job"),
        AddAmount(2, "新增奖品数量Job");
        private Integer type;
        private String desc;

        private JobType(Integer type, String desc) {
            this.type = type;
            this.desc = desc;
        }

        public Integer getType() {
            return type;
        }

        public String getDesc() {
            return desc;
        }

        public static JobType getJobType(int type) {
            JobType[] values = JobType.values();
            for (JobType value : values) {
                if (value.getType().intValue() == type) {
                    return value;
                }
            }
            return null;
        }
    }
}
